<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommentDatasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()

    {   //留言表
        Schema::create('comment_datas', function (Blueprint $table) {
            $table->increments('commentid')->comment('评论id');
            $table->integer('siteid')->comment('站点id');
            $table->integer('uid')->comment('用户id');
            $table->string('name')->comment('用户名');
            $table->dateTime('creat_at')->comment('发表时间');
            $table->string('ip',15)->comment('用户ip');
            $table->integer('status')->comment('评论状态:0:普通留言,-1:垃圾留言,1:热门加星');
            $table->string('title')->comment('评论标题');
            $table->text('main_content')->comment('主要内容');
            $table->text('content')->comment('评论内容');
            $table->integer('direction')->comment('评论方向0:无方向,1:正文,2:反方,3:中立');
            $table->integer('support')->comment('支持数');
            $table->integer('reply')->comment('是否为回复');
            //$table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('comment_datas');
    }
}
